package com.spring.schedule_system.dengxiaojiao.controller;

import com.spring.schedule_system.dengxiaojiao.appService.DeliverySetAppService;
import com.spring.schedule_system.dengxiaojiao.request.DeliverySetDto;
import com.spring.schedule_system.dengxiaojiao.request.DeliverySetQry;
import com.spring.schedule_system.dengxiaojiao.request.DeliverySetRequest;
import com.spring.schedule_system.dengxiaojiao.util.ListResult;
import com.spring.schedule_system.dengxiaojiao.util.OptResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;


/***********************************************************************************************************************
* <p>
    * 预交车天数设置 接应用层的入库
    * </p>
* @author        ly-dengxiaojiao
* @date          2023-03-26
* @version       V1.0
***********************************************************************************************************************/
@RestController
@RequestMapping(value="/omsBasics")
@Api(tags = "预交车天数设置接口")
@Validated
public class VenDbDeliverySetController {

    @Autowired
    DeliverySetAppService deliverySetAppService;

    @ApiOperation(value = "预交车天数设置-保存 ",notes="预交车天数设置-保存")
    @RequestMapping(value="venDbCarDeliveryDaySetSave",method= RequestMethod.POST)
    public OptResult venDbCarDeliveryDaySetSave(@RequestBody(required = false) DeliverySetRequest deliverySetRequest){
        return deliverySetAppService.venDbCarDeliveryDaySetSave(deliverySetRequest);
    }

    @ApiOperation(value = "预交车天数设置-查询",notes="预交车天数设置-查询")
    @RequestMapping(value="venDbCarDeliveryDaySetQuery",method=RequestMethod.POST)
    public ListResult<DeliverySetDto> venDbCarDeliveryDaySetQuery(@RequestBody(required = false)@Valid DeliverySetQry deliverySetQry){
        return deliverySetAppService.venDbCarDeliveryDaySetQuery(deliverySetQry);
    }


}